package hit.reports;

/**
 * Represents a column within a {@link BuilderTable} in the report.
 *
 */
public class TableColumn {
	
	/**
	 * The header value of the column.
	 */
	private String title;

	/**
	 * Default Constructor
	 */
	public TableColumn()
	{
		title = "";
	}
	
	/**
	 * Creates a new TableColumn with an initial title value.
	 * @param newTitle The initial value of the title.
	 * @throws IllegalArgumentException if newTitle is null.
	 */
	public TableColumn(String newTitle) throws IllegalArgumentException
	{
		if (newTitle == null)
			throw new IllegalArgumentException();
		
		title = newTitle;
	}
	
	/**
	 * Gets the title
	 * @return The value of title.
	 */
	public String getTitle() {
		return title;
	}

	/**
	 * Sets the title
	 * @param title The new value for title.
	 * @throws IllegalArgumentException if title is null.
	 */
	public void setTitle(String title) throws IllegalArgumentException
	{
		if (title == null)
		{
			throw new IllegalArgumentException();
		}
		
		this.title = title;
	}
}
